package com.starsoft.quant.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * QuantDetailId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class QuantDetailId implements java.io.Serializable {

	// Fields

	private Integer acountId;
	private Date date;
	private String secId;

	// Constructors

	/** default constructor */
	public QuantDetailId() {
	}

	/** full constructor */
	public QuantDetailId(Integer acountId, Date date, String secId) {
		this.acountId = acountId;
		this.date = date;
		this.secId = secId;
	}

	// Property accessors

	@Column(name = "acount_id", nullable = false)
	public Integer getAcountId() {
		return this.acountId;
	}

	public void setAcountId(Integer acountId) {
		this.acountId = acountId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", nullable = false, length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "sec_id", nullable = false, length = 10)
	public String getSecId() {
		return this.secId;
	}

	public void setSecId(String secId) {
		this.secId = secId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof QuantDetailId))
			return false;
		QuantDetailId castOther = (QuantDetailId) other;

		return ((this.getAcountId() == castOther.getAcountId()) || (this.getAcountId() != null
				&& castOther.getAcountId() != null && this.getAcountId().equals(castOther.getAcountId())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null && castOther.getDate() != null && this
						.getDate().equals(castOther.getDate())))
				&& ((this.getSecId() == castOther.getSecId()) || (this.getSecId() != null
						&& castOther.getSecId() != null && this.getSecId().equals(castOther.getSecId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getAcountId() == null ? 0 : this.getAcountId().hashCode());
		result = 37 * result + (getDate() == null ? 0 : this.getDate().hashCode());
		result = 37 * result + (getSecId() == null ? 0 : this.getSecId().hashCode());
		return result;
	}

}